<{extends file="<{$tempdir}>/public/admin.html"}>
<{block name=extendjs}>
<script type="text/javascript" language="javascript" src="<{$siteurl}>/templates/<{$tempdir}>/public/js/artdialog/plugins/iframeTools.js"></script>
<script src="<{$siteurl}>/templates/<{$tempdir}>/public/js/datepicker/WdatePicker.js" type="text/javascript" language="javascript"></script>
<{/block}>
 <{block name=controlname}>营销分享优惠券规则列表<{/block}>
 <{block name=bodylist}>

      <div style="width:auto;overflow-x:hidden;overflow-y:auto">

      	  <div class="search">


            <div class="search_content">

            	 <form method="post" name="form1" action="<{ofunc type=url link="/adminpage/card/module/juanmarketing"}>">

             
			  <label>名称：</label>
            	   <input type="text" name="name" value="<{$name}>" style="width:130px;"> 
			 
			 
            	   <select name="type">
            	   	  <option value="all">请选择优惠券类型</option>
 			   		 	  	  <option value="1" <{if $type == '1'}>selected<{/if}>>充值优惠券</option>
			   		 	  	  <option value="2" <{if $type == '2'}>selected<{/if}>>下单成功分享优惠券</option>
			   		 	  	  <option value="3" <{if $type == '3'}>selected<{/if}>>推广优惠券</option>
			   		 	  	  <option value="4" <{if $type == '4'}>selected<{/if}>>关注微信领取优惠券</option>
            	  </select>
            	 时间
            	   从<input class="Wdate datefmt" type="text" name="starttime" id="starttime" value="<{$starttime|date_format:"%Y-%m-%d"}>"  onFocus="WdatePicker({isShowClear:false,readOnly:true});" />
			   		 	  到<input class="Wdate datefmt" type="text" name="endtime" id="endtime" value="<{$endtime|date_format:"%Y-%m-%d"}>"  onFocus="WdatePicker({isShowClear:false,readOnly:true});" />


            	    <input type="submit" value="提交查询" class="button">
            	 </form>
            </div>

      	</div>






           <div class="tags">



          <div id="tagscontent">

            <div id="con_one_1">

              <div class="table_td" style="margin-top:10px;">

              <form method="post" action="" onsubmit="return remind();" id="delform">

                  <table border="0" cellspacing="2" cellpadding="4" class="list" name="table" id="table" width="100%">

                    <thead>

                      <tr>

                        <th width="60px"><input type="checkbox" id="chkall" name="chkall" onclick="checkall()"></th>

                        <th align="center">id</th>
                         <th align="center">名称</th>
                        <th align="center">优惠券类型</th> 
                        <th align="center">优惠券数量或总金额</th>
                         <th align="center">优惠券限制金额范围</th>
                         <th align="center">优惠券优惠金额范围</th>
                        <th align="center">添加日期</th>
                        <th align="center">失效日期</th>
                        <th align="center">是否开启</th>
                        <th align="center">支持支付类型</th>
                        <th align="center">排序</th>
                        <th align="center">操作</th>

                      </tr>

                    </thead>

                     <tbody>
                       <{foreach from=$marketinglist item=items}>
                      <tr class="s_out" onmouseover="this.bgColor='#F5F5F5';" onmouseout="this.bgColor='ffffff';" bgcolor="#ffffff">
                        <td align="center" ><input type="checkbox" name="id[]" value="<{$items['id']}>"></td>
                        <td align="center"><{$items['id']}></td>
                        <td align="center"> <{$items['name']}> </td>
                        <td align="center"  ><{$juantypename[$items['type']]}></td>
                        <td align="center"><{if $items['type'] == 1 }>总金额：<{$items['juantotalcost']}>元<{else}><{$items['juannum']}>张<{/if}></td>
                        <td align="center">
  						<{if $items['jiancostmin'] < $items['jiancostmax'] &&  $items['jiancostmin'] != 0 }>
							满：<{$items['jiancostmin']}>至<{$items['jiancostmax']}> 元
						<{elseif  $items['jiancostmin'] == $items['jiancostmax']  &&  $items['jiancostmin'] != 0 }>
							满：<{$items['jiancostmin']}>
						<{elseif  $items['jiancostmax'] == 0 }>
							减：<{$items['jiancostmin']}>元以上
						<{/if}>
						</td>
						<td align="center">
  						<{if $items['jiacostmin'] < $items['jiacostmax']  }>
							减：<{$items['jiacostmin']}>至<{$items['jiacostmax']}> 元
						<{elseif  $items['jiacostmin'] == $items['jiacostmax'] }>
							减：<{$items['jiacostmin']}>
						<{/if}>
						</td>
						<td align="center"><{$items['addtime']|date_format:"%Y-%m-%d %H:%M"}></td> 
						<td align="center"><{$items['endtime']|date_format:"%Y-%m-%d %H:%M"}></td> 
                         <td align="center"><{if $items['is_open']==1}>开启<{else}>关闭<{/if}></td>
						  <{assign var=paytypearr value=","|explode:$items['paytype']}> 
                         <td align="center">
							 <{if  in_array(1,$paytypearr ) }>货到付款<br /> <{/if}>
							 <{if  in_array(2,$paytypearr ) }>在线支付<{/if}>
						 </td>
                         <td align="center"><{$items['orderid']}></td>
						<td align="center">
                        	<a href="<{ofunc type=url link="/adminpage/card/module/addMarketing/id/<{$items['id']}>"}>" ><img src="<{$siteurl}>/templates/<{$tempdir}>/public/images/admin/edit.jpg"></a>
                        	<a onclick="return remind(this);" href="<{ofunc type=url link="/adminpage/card/module/delmarketing/id/<{$items['id']}>/datatype/json"}>"><img src="<{$siteurl}>/templates/<{$tempdir}>/public/images/admin/del.jpg"></a>
							</td>                        

						</tr>
                       <{/foreach}>

                    </tbody>

                  </table>

                <div class="blank20"></div>

                </form>

                <div class="page_newc">
				
					<div class="select_page"><a href="#" onclick="checkword(true);">全选</a>/<a href="#" onclick="checkword(false);">取消</a> 
						  <a onclick="return remindall(this);" href="<{ofunc type=url link="/adminpage/card/module/delmarketing/datatype/json"}>" class="delurl">删除</a>  
						  <a href="<{ofunc type=url link="/adminpage/card/module/addMarketing"}>" class="delurl">添加营销分享优惠券规则</a></div>
				 
                 	     </div>
                       <div class="show_page"><ul><{$pagecontent}></ul></div>
                 </div>
  <div class="page_newc">
				
					<div class="select_page" style="color:red;width:800px;">
					<a style="color:red;width:800px;" href="jvascript:void(0);"  >温馨提示：如果同一种类型的优惠券有多条符合条件时候，则系统读取的是排序ID为最小的一种</a> 
						  </div>
				 
                 	     </div>
                <div class="blank20"></div>

              </div>

            </div>

          </div>

        </div>


  </div>

</div>
<{/block}>